package provice_match2022;
import java.util.*;

public class C {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
		int len = str.length();
		int[] count = new int[26];
		int max = -1;
		for (int i = 0; i < len; i++) {
			int idx = str.charAt(i) - 'A';
			count[idx] ++;
			max = Math.max(count[idx], max);
		}
		for (int i = 0; i < 26; i++) {
			if (count[i] == max) {
				System.out.print(Character.toChars('A' + i));
			}
		}
		scan.close();
	}
}
